Skip to content

Deliver each console reply to the request it answers, so overlapping scans both finish - #17

Merged
mcencini merged 1 commit into
masterfrom
gateway-routes-replies
Oct 8, 2026
Merged

mcencini merged 1 commit into
masterfrom
gateway-routes-replies

Conversation

@mcencini

@mcencini mcencini commented Oct 8, 2026

Copy link
Copy Markdown

Two scans requested back to back shared the browser's WebSocket to the console. Each request's loop discarded the replies that carried the other's id, so the clock, the images and the done of both scans could be lost, and both waited forever. This is why a gre2D's image sometimes never appeared.

AsyncGateway now reads the connection one request at a time and hands every reply to the request whose id it carries (_replies queues behind a _reading lock).

Test plan

  • tests/test_pulserver_console.py: overlapping requests each receive their own replies
  • browser suite against the dev console

🤖 Generated with Claude Code

…scans both finish

Two scans requested one after the other shared the browser's WebSocket, and
each request's loop discarded the replies carrying the other's id: the clock,
the images and the done of both could be lost, and both waited forever. The
asynchronous gateway now reads the connection one request at a time and
hands every reply to the request whose id it carries.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mcencini
mcencini merged commit 1444ee9 into master Oct 8, 2026
3 checks passed
@mcencini
mcencini deleted the gateway-routes-replies branch October 8, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant